// 使用 Mock
import Mock from 'mockjs'

// 设置模拟返回时间
Mock.setup({
	timeout: '200-600'
})

Mock.mock(
	// 属性 list 的值是一个数组，其中含有 1 到 10 个元素
	"/info/html",
	'get',
	() => {
		return {
			data: {
				username: "VanKa",
				content: "总是在凌晨想通很多事情，又在天亮之后，忘得一干二净.",
			},
			count: 0,
			msg: "",
			code: 0,
			status: "SUCCESS"
		}
	}
);
Mock.mock(
	"/info/meun",
	'get',
	() => {
		return {
			"data": [{
				"id": 30,
				"url": "/index",
				"icon": "0",
				"name": "首页",
				"sort": 0,
				"data": null
			}, {
				"id": 28,
				"url": "/classify",
				"icon": "0",
				"name": "分类",
				"sort": 0,
				"data": null
			}, {
				"id": 28,
				"url": "/label",
				"icon": "0",
				"name": "标签",
				"sort": 0,
				"data": null
			}, {
				"id": 23,
				"url": "/archives",
				"icon": "",
				"name": "归档",
				"sort": 0,
			},  {
				"id": 11,
				"url": "/collect",
				"icon": "",
				"name": "收藏",
				"sort": 99
			}, {
				"id": 11,
				"url": "/show",
				"icon": "",
				"name": "展示",
				"sort": 99
			}],
			"count": 0,
			"msg": "",
			"code": 0,
			"status": "SUCCESS"
		}
	}
)

Mock.mock(
	"/info/list",
	'get',
	() => {
		return {
			"data": [{
				"id": 30,
				"url": "/index",
				"icon": "0",
				"name": "首页",
				"sort": 0,
				"data": null
			}, {
				"id": 28,
				"url": "/classify",
				"icon": "0",
				"name": "分类",
				"sort": 0,
				"data": null
			}, {
				"id": 23,
				"url": "/archives",
				"icon": "",
				"name": "归档",
				"sort": 0,
			},  {
				"id": 11,
				"url": "/collect",
				"icon": "",
				"name": "收藏",
				"sort": 99
			}, {
				"id": 11,
				"url": "/show",
				"icon": "",
				"name": "展示",
				"sort": 99
			}],
			"count": 0,
			"msg": "",
			"code": 0,
			"status": "SUCCESS"
		}
	}
)
